﻿#include "panel.h"
#include "ui_panel.h"

#include <QDebug>

Panel::Panel(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Panel)
{
    ui->setupUi(this);

    stockView=nullptr;
    rejectView=nullptr;
    lossView=nullptr;

    desktopRect=qApp->desktop()->availableGeometry();
    move(desktopRect.width() - 356, 72);
}

Panel::~Panel()
{
    delete ui;
}

void Panel::on_btn_stockView_clicked()
{
    if(stockView==nullptr)
        stockView=new StockView(this);
    stockView->show();
}

void Panel::on_btn_lossView_clicked()
{
    if(lossView==nullptr)
        lossView=new LossView(this);
    lossView->show();
}

void Panel::on_btn_rejectView_clicked()
{
    if(rejectView == nullptr)
        rejectView=new RejectView(this);
    rejectView->show();
}
